package com.yangyang.rpc.db;

import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;

import javax.annotation.PostConstruct;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class StudentInfoCache {

    private static final Map<String, String> studentInfo = new ConcurrentHashMap<>();

    public StudentInfoCache() {
        studentInfo.put("20210000000000", "null");
        studentInfo.put("20210123456789", "心心");

    }

    public String getNameBySNo(String sNo){
        if (StringUtils.isEmpty(sNo)) return null;
        return studentInfo.get(sNo);
    }

}
